package com.dragon.mmochat.model.enumType;

import com.dragon.mmochat.service.MmochatNewsService;

public enum MmochatQQNewsType {
	奇闻逸事(1, MmochatNewsService.qqNewsRssUrl1), 国内时事(2,
			MmochatNewsService.qqNewsRssUrl2), 国际新闻(3,
			MmochatNewsService.qqNewsRssUrl3);

	int key;
	String url;

	MmochatQQNewsType(int k, String u) {
		key = k;
		url = u;
	}

	public String getUrl() {
		return url;
	}

	public int getKey() {
		return key;
	}

	public static MmochatQQNewsType get(int k) {
		for (MmochatQQNewsType type : MmochatQQNewsType.values()) {
			if (type.getKey() == k) {
				return type;
			}
		}
		return null;
	}

}
